Ch.18 Applications
Return to TOC
Stochastic Matrices
A matrix is stochastic if all entries are nonnegative and the sum of the entries of each column are 1.
If every entry is positive the matrix is said to be positive
These are common in probabilistic phenomena (Markov chains)
Suppose a movie can be rented from location 1, 2, or 3 and returned to any location. Let A be matrix whose ij entry is the probability a customer renting a movie from location j returns it to location i
A=⎝⎜⎛.3.3.4.4.4.2.5.3.2⎠⎟⎞
The columns sum to 1 because a movie rented has a 100% chance of getting returned to some location.
Now, let v=(x,y,z) represent the number of movies at the three locations. Then there will be approximately
Av=A⎝⎜⎛xyz⎠⎟⎞=⎝⎜⎛.3x+.4y+.5z.3x+.4y+.3z.4x+.2y+.2z⎠⎟⎞
movies in the three locations the next day. Since the columns add to 1, the total number won't change.
If xn,yn,zn are the number of movies in location 1,2,3, on day n, then
vn=Avn−1=A2vn−2=⋯=Anv0
An iterationvn+1=Avn is used to model a state change controlled by a matrix:
- vn is the state at time n
- vn+1 is the state at time n+1
- A is the change of state matrix
Eigenvalues
To compute Anv0, it can help to use eigenvalues.
A stochastic matrix always has an eigenvalue of 1.
Proof
Consider 3×3 stochastic matrix
A=⎝⎜⎛x1x2x3y1y2y3z132z3⎠⎟⎞
Since the columns add to 1, the rows of AT add to 1. Thus, (1,1,1) is an eigenvector with eigenvalue 1.
⎝⎜⎛x1y1z1x2y2z2x3y3z3⎠⎟⎞⎝⎜⎛111⎠⎟⎞=⎝⎜⎛x1+x2+x3y1+y2+y3z1+z2+z3⎠⎟⎞=1⋅⎝⎜⎛111⎠⎟⎞
Any other eigenvalue is less than 1. That is, 1 is the largest eigenvalue of a stochastic matrix.
Proof
Let v=⎝⎜⎜⎜⎜⎛x1x2⋮xn⎠⎟⎟⎟⎟⎞ be an eigenvalue of positive stochastic matrix A.
λv=ATv⟹λxj=i=1∑naijxi
Choose xj with the largest absolute value, so that ∣xi∣≤∣xj for all i. Then
∣λ∣⋅∣xj∣=∣∣∣∣∣∣i=1∑naijxi∣∣∣∣∣∣≤i=1∑naij∣xi∣≤i=1∑naij∣xj∣=1⋅∣xj∣
The first inequality is valid since A is a positive matrix. The final equality holds since A is stochastic.
Let A=(3/41/41/43/4). A is diagonalizable, with A=PDP−1 where
P=(111−1)D=(1001/2)
Diagonalization Process
The characteristic polynomial is (3/4−λ)2−(1/4)2, so the eigenvalues are 1 and 1/2.
Thus, D=(1001/2)
An eigenvector with associated eigenvalue 1 is (11), as seen before.
An eigenvector with associated eigenvalue 1/2 can be found by solving (A−1/2I)v=0
(1/41/41/41/4)(xy)=0
gives the solution set {(1−1)t ∣ t∈R}
So, we have P=(111−1)
An acts on usual coordinates in the same way D acts on B=⟨w1=(11),w2=(1−1)⟩, so RepB(Anx)=DnRepB(x). Thus,
RepB(x)=(c1c2)⟹RepB(Anx)=(1001/2n)(c1c2)=(c1c2/2n)
Thus, Anx=c1w1+c2/2nw2. As n grows larger, the second term approaches 0, so Anx approaches c1w1, an eigenvector with eigenvalue 1. So, all vectors get "sucked into" the 1-eigenspace spanned by (11)
This means that after a sufficiently large iterations vn+1=Avn, the state does not change; i.e. Av=v. That vector v in which the state stabilizes is in the 1-eigenspace of A.
A steady state for stochastic matrix A is an eigenvector w with eigenvalue 1 such that all entries are positive and add to 1.
Perron-Frobenius Theorem
If A is a positive stochastic matrix, then it has a unique steady state vector w spanning the 1-eigenspace. Moreover, for any v0 with entries summing to c, Avn=Avn−1v approaches cw.
In other words:
- the 1-eigenspace of a positive stochastic matrix is a line
- taking any 1-eigenvector and dividing by the sum of the entries always results in a steady state with positive entries that sum to 1
- w is like steady state percentages; the same percentage will be there the next day
- the sum c is the total number; eventually, they arrange themselves according to the steady state percentage cw
importance rule: if page P links to n other pages Q1,...,Qn, then each Qi inherits 1/n of P's importance
Consieder this 4-page network

We can compute an importance matrix

Each color corresponds to that page giving its inheritance to the pages it links to
By the importance rule, we can set the equation
⎝⎜⎜⎜⎛c+21d31a31a+21b+21d31a+21b⎠⎟⎟⎟⎞=⎝⎜⎜⎜⎛abcd⎠⎟⎟⎟⎞
We see that the importance matrix is a positive stochastic matrix and the rank vector is an eigenvector with eigenvalue 1. This is a steady state.
If a page links to no other page, its column will sum to 0, making the resulting matrix not stochastic.
Additionally, if there are two distinct "islands" of pages, there may be more than one eigenvector with eigenvalue 1.
To solve this, fix p∈(0,1), the dampening factor (typically p=0.15). The Google Matrix is
M=(1−p)+p⋅B where B=N1⎝⎜⎜⎜⎜⎛11⋮111⋮1⋯⋯⋱⋯11⋮1⎠⎟⎟⎟⎟⎞,
N is the total number of pages, and A is the importance matrix.
This is a stochastic matrix, and solves both of the problems above.